Field of the Invention
The present invention relates to image processing for using virtual illumination to generate from a captured image an image that looks as if it had been captured under a desired illumination condition different from the illumination condition of the captured image.
Description of the Related Art
When an image of an object is captured by an imaging apparatus, the captured image significantly varies depending on illumination (light) applied to the object. For example, when a person is an object, a stereoscopic image can be captured under an illumination condition where light is obliquely incident on the object because a shadow on his/her face is emphasized. On the other hand, under an illumination condition such as a back-lighting condition where strong light is incident from the backside of the object, a captured image in which all or a part of the object is darkened by shadows will be acquired. There is provided a method for generating another image that looks as if the object had been captured under an illumination condition desired by the user, by correcting the captured image in which the object is darkened as in the above latter case. According to a method discussed in Japanese Patent Application Laid-Open No. 2009-267662, an image of an object captured under a virtual illumination condition is generated by using model data of the object and the generated image is arranged on an object region within a captured image, so that illumination with respect to the object within the captured image is corrected. In the method, the virtual illumination condition is set by adjusting the brightness of each of a plurality of illumination sources that is previously arranged on predetermined positions.
Further, Japanese Patent Application Laid-Open No. 2010-135996 discusses a method for executing pseudo-lighting processing on a captured image by applying virtual illumination to an object. Specifically, the light intensity of the virtual illumination in the captured image is determined based on a maximum luminance value of the object image. In the method, the Gaussian distribution is deflected according to a preset illumination direction, so that the image in which virtual illumination had been applied to the object from a desired direction can be acquired.
Further, Japanese Patent Application Laid-Open No. 4-301304 discusses a method for displaying an image illuminated by a virtual illumination apparatus, by setting a simulated shape and the position and orientation of the virtual illumination apparatus in an imaging area. In the method, the position and orientation of the virtual illumination apparatus is input, for example, through a keyboard operation.
In a case where the user would like to adjust the illumination for the object in a captured image, the user may change the position and orientation of the virtual illumination until the object is adjusted to a desired state. However, according to the methods discussed in Japanese Patent Application Laid-Open Nos. 2009-267662 and 2010-135996, it is not possible to adjust a three-dimensional position of the virtual illumination. Further, according to the method discussed in Japanese Patent Application Laid-Open No. 4-301304, in order to set the position and orientation of the virtual illumination, the user needs to set coordinate values in x-axis, y-axis, and z-axis directions for representing the position of the virtual illumination and to set rotation amounts around the respective axes for representing the orientation of the virtual illumination. Therefore, the user is required to set a plurality of parameters each time the user adjusts the position and orientation of the virtual illumination.